﻿using System;
using System.Collections;
using MvcForum.Net.Enums;

namespace MvcForum.Net.Business
{
   public class UserInfo
    {
       public string UserName
       {
           get; set;

       }

        public string Email
        {
            get;
            set;
        }

        public float TimeZone
        {
            get;
            set;
        }

        public int TotalMessages
        {

            get;
            set;
        }

        public int RoleId
        {

            get;
            set;
        }


        public int UserId
        {

            get;
            set;
        }


        public int MessagesNoRead
        {
            get;
            set;
        }

        public bool IsAdmin
        {
           get;
           set;
        
        }

        public bool IsActived
        {
            get;
            set;

        }

        public bool IsModerator
        {

            get;
            set;

        }


        public DateTime LastPosted
        {
            get;
            set;
        }

        public DateTime LastSearched
        {
            get;
            set;
        }

        public ArrayList Moderates
        {
            get; set;
        }

        public AccessMask Permissions
        {
            get;
            set;
        }

        public UserCommand Command
        {
            get; set;
        }

       public bool IsModerated(int forumId)
       {
          if(Moderates!=null)
          {
              return Moderates.Contains(forumId);
          }
           return false;
       }


    }


   public class UserCommand
   {
       
       public int? TopicId
       {
           get;
           set;
       }


       public int ForumId
       {
           get;
           set;
       }

       //public int ReplyTo
       //{
       //    get;
       //    set;
       //}


       public CommandType Arg
       {
           get;
           set;
       }

       public string EmailTo
       {
           get; set;
       }


   }
}
